﻿using System;
using System.ComponentModel.DataAnnotations;

namespace WebAPI.Filters
{

    [AttributeUsage(AttributeTargets.Property)]
    public class Empty : ValidationAttribute
    {
        public override bool IsValid(object? value)
        {
            var inputValue = value as string;
            return !string.IsNullOrEmpty(inputValue);
        }
    }
}